package com.ruoyi.work.service.impl;

import com.ruoyi.work.domain.SysIteratorContent;
import com.ruoyi.work.domain.vo.BoardDataVo;
import com.ruoyi.work.mapper.WorkBoardMapper;
import com.ruoyi.work.service.IWorkBoardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: MMDZ
 * @Desc:
 */
@Service
public class WorkBoardServiceImpl implements IWorkBoardService {

    @Autowired
    private WorkBoardMapper workBoardMapper;

    @Override
    public BoardDataVo init() {
        // 在线数量
        Integer online = 0;

        // 提报数量
        Integer fill = workBoardMapper.getFillUserQty();
        // 未提报人数
        Integer nofill = workBoardMapper.getNoFillUserQty();

        // 审核数量
        Integer check = workBoardMapper.getCheckQty();
        // 待审核数量
        Integer incheck = workBoardMapper.getInCheckQty();
        // 回退数量
        Integer back = workBoardMapper.getBackQty();

        // 项目配置数量
        Integer project = workBoardMapper.getProjectSettingQty();

        // 内容
        List<SysIteratorContent> contents = workBoardMapper.getIteratorContentList();
        return new BoardDataVo(online, fill, nofill, check, incheck, back, project, contents);
    }
}
